﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IndoorPosition.Server.Core.Entities
{
    /// <summary>
    /// 蓝牙基站
    /// </summary>
    [Comment("蓝牙基站")]
    public class Station: EntityBase
    {
        /// <summary>
        /// 产品型号
        /// </summary>
        [Comment("产品型号")]
        [StringLength(50)]
        public string Model
        {
            get;
            set;
        }

        /// <summary>
        /// 芯片型号
        /// </summary>
        [Comment("芯片型号")]
        [StringLength(50)]
        public string Board
        {
            get;
            set;
        }

        /// <summary>
        /// 设备名称
        /// </summary>
        [Comment("设备名称")]
        [StringLength(50)]
        public string IBeaconName
        {
            get;
            set;
        }


        /// <summary>
        /// 功率校验/1米
        /// </summary>
        [Comment("功率校验/1米")]
        public double MeasuredPower
        {
            get;
            set;
        }

        /// <summary>
        /// 发射功率
        /// </summary>
        [Comment("发射功率")]
        public double TransmissionPower
        {
            get;
            set;
        }

        /// <summary>
        /// 广播周期ms
        /// </summary>
        [Comment("广播周期ms")]
        public int BroadcastInterval
        {
            get;
            set;
        }

        /// <summary>
        /// 蓝牙MAC地址
        /// </summary>
        [Comment("蓝牙MAC地址")]
        [StringLength(20)]
        public string MAC
        {
            get;
            set;
        }


        /// <summary>
        /// UUID
        /// </summary>
        [Comment("UUID")]
        [StringLength(50)]
        public string UUID
        {
            get;
            set;
        }

        /// <summary>
        /// 主值
        /// </summary>
        [Comment("主值")]
        public int Major
        {
            get;
            set;
        }

        /// <summary>
        /// 辅值
        /// </summary>
        [Comment("辅值")]
        public int Minor
        {
            get;
            set;
        }

        /// <summary>
        /// 电池容量
        /// </summary>
        [Comment("电池容量")]
        public int Battery
        {
            get;
            set;
        }

        /// <summary>
        /// 所属楼层ID
        /// </summary>
        [Comment("所属楼层ID")]
        public int FloorId
        {
            get;
            set;
        }

        /// <summary>
        /// 所属楼层
        /// </summary>
        [ForeignKey("FloorId")]
        public virtual Floor Floor
        {
            get;
            set;
        }


        /// <summary>
        /// 位置
        /// </summary>
        public virtual Position Position
        {
            get;
            set;
        }

    }
}
